﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Taobao.Tools2.Domain.EntityFramework.Mappings
{
    public class PromotionDetailMapping: ModelMapping<PromotionDetail>
    {
        public PromotionDetailMapping()
            : base()
        {
            Map(d => d.ToTable("PromotionDetail"));
            Property(c => c.DiscountFee).HasColumnName("DiscountFee");
            Property(c => c.GiftItemName).HasColumnName("GiftItemName");
            Property(c => c.Name).HasColumnName("Name");
            Property(c => c.PromotionDetailID).HasColumnName("PromotionDetailID");
            HasKey(c => c.ID);

            Property(c => c.ShopID).HasColumnName("ShopID");
            Property(c => c.TradeID).HasColumnName("TradeID");
            //HasRequired(c => c.Shop).WithOptional().Map(c => c.MapKey("shopid"));
        }
    }
}
